package com.laicunba.service.activity.dataqueryimpl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.laicunba.pojo.RegistryDO;
import com.laicunba.service.RegistryService;
import com.laicunba.service.activity.ActivityDataQueryService;
import com.laicunba.service.activity.ActivityDataQueryServiceTemplate;

@Service
public class RegistryActivityDataQueryImpl extends ActivityDataQueryServiceTemplate
		implements ActivityDataQueryService {

	@Autowired
	private RegistryService registryService;

	@Override
	public String getDataCode() {
		return "REG_INFO";
	}

	@Override
	public Object query(String uid, Map<String, String> map) {
		RegistryDO registryDO = registryService.get(RegistryDO.class, "sys.act.data." + map.get("activity_id"));
		return registryDO == null ? null : registryDO.getVal();
	}

}
